package io.xxx.mario.task;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TaskMapper extends BaseMapper<Task> {

    @Select("select * from task where execution_mode = #{executionMode} and status = 0 and start_time <= current_timestamp ")
    List<Task> findArrivedTasks(@Param("executionMode") int executionMode);
}
